package com.eternal.login.shiro;/**
 * @Title: RequestInterceptor
 * @ProjectName notest
 * @Description: TODO
 * @author Eternal
 * @date 2018/11/4 20:35
 */

import org.apache.shiro.session.Session;
import org.apache.shiro.util.PermissionUtils;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @Class RequestInterceptor
 * @Description: TODO
 * @Author Eternal
 * @Version
 * @date 2018/11/4 20:35
 */
public class RequestInterceptor extends HandlerInterceptorAdapter {
    /*private String unauthenticatedUrl;

    public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
                             Object handler) throws Exception {
        if(PermissionUtils.isLogin(request)){
            return true;
        }
        //token已失效，返回提示信息
        request.getRequestDispatcher(unauthenticatedUrl).forward(request, response);
        return false;
    }

    public void setUnauthenticatedUrl(String unauthenticatedUrl) {
        this.unauthenticatedUrl = unauthenticatedUrl;
    }*/
}
